import axios from 'axios';

const request = axios.create({
  baseUrl: '',
  timeOut: 5000,
});

request.interceptors.request.use((config) => {
  return config;
}, (error) => {
  return Promise.reject(new Error('请求拦截了， 错误为：' + error.message))
});

request.interceptors.response.use((res) => {
  console.log(res)
  return res
},(error) => {
  return Promise.reject(new Error('响应失败了 错误为：' + error.message))
});
